#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Probability.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Probability)
{
    TEST(The probability should be 0.35 for both Event A(0.5) and Event B (0.7)happen )
    {
        Probability EventA(0.5);
        Probability EventB(0.7);
        ASSERT_EQ(0.35f, EventA&EventB);
    }

    TEST(The probabilty should be 0.85 for either Event A(0.5) or Event B(0.7) happen)
    {
    	Probability EventA(0.5);
        Probability EventB(0.7);
        ASSERT_EQ(0.85f, EventA|EventB);
    }

    TEST(The probabilty should be 0.5 for Event A(0.5) do not happen)
    {
    	Probability EventA(0.5);
    	ASSERT_EQ(0.5, ~EventA);
    }
};
